//
//  DCAvchatNetworkRequest.h
//  DCUtilKit
//
//  Created by zhangtao on 2020/9/21.
//  Copyright © 2020 zhangtao. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "DCAvchatNetworkRequestAdapter.h"

NS_ASSUME_NONNULL_BEGIN

typedef void (^SuccessBlock)(NSDictionary *data);
typedef void (^FailureBlock)(NSDictionary *error);

@interface DCAvchatNetworkRequest : NSObject

@property(nonatomic,strong) DCAvchatNetworkRequestAdapter *networkRequestAdapter;
@property(nonatomic,strong) NSDictionary *networkRequestInfo;

+ (instancetype) sharedNetworkRequest;
/**
 *  get请求
 */
- (void)getWithUrlString:(NSString *)url header:(__nullable id)header parameters:(id)parameters success:(SuccessBlock)successBlock failure:(FailureBlock)failureBlock;

/**
 * post请求
 */
- (void)postWithUrlString:(NSString *)url header:(__nullable id)header parameters:(id)parameters success:(SuccessBlock)successBlock failure:(FailureBlock)failureBlock;

/**
 * put请求
 */
- (void)putWithUrlString:(NSString *)url header:(__nullable id)header parameters:(id)parameters success:(SuccessBlock)successBlock failure:(FailureBlock)failureBlock;

@end

NS_ASSUME_NONNULL_END
